package com.tengju.bff.interfaces.shared;

import com.tengju.user.application.archives.dto.PageQueryDTO;

public class PageAssembler {
    public static <T extends PageQueryDTO> void convert(T t) {
        Integer pageSize = t.getPageSize();
        Integer pageIndex = t.getPageIndex();
        Integer offset = (pageIndex - 1) * pageSize;
        t.setOffset(offset);
    }
}
